#include "app_device.h"
#include "app_mqtt.h"
#include "app_pool.h"
#include "log.h"
#include <stdio.h>
#include <unistd.h>


int main(int argc, char const *argv[])
{
    // c线程池o启动
    app_pool_init();
    // 消息队列o启动
    app_mqtt_init();
    // 设备初始化 
    Device *device= app_device_init("/home/atguigu/workspace0724/gateway/test_dev_file");
    // 设备启动 
    app_device_start(device);
    // 准备数据 模拟路由模块发送给e设备模块  连接方式1字节 id长度1字节 payload长度1字节 id payload
    char write_data[9]={0x01,0x02,0x04,0x55,0x66,0xAA,0xBB,0xCC,0xDD} ;
    app_device_recv_router(device,write_data,9);

    sleep(10000000);
    return 0;
}
